#ifndef __TIME_INTERVAL_H__
#define __TIME_INTERVAL_H__

#include <chrono>

class TimeInterval
{

public:
    TimeInterval();
    void      start();
    void      end();
    long long duration_ns();
    long long duration_ms();

private:
    std::chrono::time_point<std::chrono::high_resolution_clock> start_time;
    std::chrono::time_point<std::chrono::high_resolution_clock> end_time;
    bool                                                        running;
};

#endif
